package com.xinqi.common.log.asynclog.annotation;

import com.xinqi.common.log.asynclog.enums.AsyncOperaType;
import com.xinqi.common.log.asynclog.enums.AsyncStatus;
import com.xinqi.common.log.asynclog.enums.AsyncType;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 异步操作日志记录
 *
 * @author dzy
 */
@Target({ElementType.PARAMETER, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface AsyncLog {

    /**
     * 标题
     */
    String title() default "";

    /**
     * 业务类型
     */
    AsyncType asyncType() default AsyncType.OTHER;

    /**
     * 业务操作类型
     */
    AsyncOperaType operatorType() default AsyncOperaType.OTHER;

    /**
     * 业务操作结果
     */
    AsyncStatus asyncStatus() default AsyncStatus.SUCCESS;

    /**
     * 异常信息结果
     */
    String errorMsg() default "";

}
